package com.wwtech.epp.ui.activity.friend.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.friend.SearchFriendActivity;
import com.wwtech.epp.ui.activity.friend.contract.SearchFriendContract;
import com.wwtech.epp.ui.activity.friend.presenter.SearchFriendPresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.friend
 * @Description: The moduele of SearchFriendActivity, provide field for SearchFriendActivity
 * @date 2017/08/22 15:19:25
 */
@Module
public class SearchFriendModule {
    private final SearchFriendContract.View mView;


    public SearchFriendModule(SearchFriendContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public SearchFriendPresenter provideSearchFriendPresenter(HttpAPIWrapper httpAPIWrapper, SearchFriendActivity mActivity) {
        return new SearchFriendPresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public SearchFriendActivity provideSearchFriendActivity() {
        return (SearchFriendActivity) mView;
    }
}